<template>
   <div>
    <header class="title_header">
      <el-button type="primary" @click="showAdd">新增标题</el-button>
    </header>
    <Add :state="state" @cancle="cancle" @success="success"></Add>    <!-- 增加 -->
    <Edit :state="statee" @cancle="cancle"></Edit>  <!-- 编辑 -->
    <el-table
    :data="tableData"
    style="width: 100%"
    :default-sort = "{prop: 'date', order: 'descending'}"
    >
    <el-table-column prop="id" label="编号" sortable></el-table-column>
    <el-table-column prop="name" label="名称" sortable></el-table-column>
    <el-table-column prop="create_time" label="创建日期" sortable></el-table-column> 
    <el-table-column prop="update_time" label="更新日期" sortable></el-table-column>
    <el-table-column label="操作">
      <template #default="scope"><!-- 插槽 -->
        <el-button
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
        <el-button
          size="mini"
          type="danger"
          @click="handleDelete(scope.$index, scope.row)"  v-loading.fullscreen.lock="fullscreenLoading">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script>
export default {

}
</script>

<style>

</style>